package com.moonstar.mapper;

import com.moonstar.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


@Mapper
public interface UserMapper  {

    User get(Long id);

    List<User> list(Map<String,Object> map);

    int count(Map<String,Object> map);

    int save(User user);

    int update(User user);

    int remove(Long id);

    User login(@Param("username") String username, @Param("password") String password);

    User getByUsername(String username);
}
